package com.ushine.design.design.c_behavioral_pattern.h_state.c_switch;

public class OnState extends SwitchState {

    @Override
    public void on(Switch on) {
        System.out.println("已经打开！");
    }

    @Override
    public void off(Switch off) {
        System.out.println("关闭！");
        off.setState(Switch.getState("off"));
    }

}
